/**
 * 
 */
package com.onstar.cn.map.route;

import android.content.Context;

import com.amap.api.maps2d.AMap;
import com.amap.api.maps2d.model.BitmapDescriptor;
import com.amap.api.maps2d.model.LatLngBounds;
import com.amap.api.maps2d.overlay.DrivingRouteOverlay;
import com.amap.api.services.core.LatLonPoint;
import com.amap.api.services.route.DrivePath;

/**
 * @author Qiying Gong
 * 
 * @Created 2013-9-27
 */
public class MyRouteOverlay extends DrivingRouteOverlay {

	private BitmapDescriptor startIcon;
	private BitmapDescriptor endIcon;
	private BitmapDescriptor wayIcon;
	private int routeColor;

	public MyRouteOverlay(Context context, AMap map, DrivePath drivePath, LatLonPoint start, LatLonPoint end) {
		super(context, map, drivePath, start, end);
	}

	public void setRouteMarkers(BitmapDescriptor startIcon, BitmapDescriptor endIcon, BitmapDescriptor wayIcon) {
		this.startIcon = startIcon;
		this.endIcon = endIcon;
		this.wayIcon = wayIcon;
	}

	public void setRouteColor(int color) {
		this.routeColor = color;
	}

	@Override
	public BitmapDescriptor getEndBitmapDescriptor() {
		return endIcon;
	}

	@Override
	public BitmapDescriptor getStartBitmapDescriptor() {
		return startIcon;
	}

	@Override
	public BitmapDescriptor getDriveBitmapDescriptor() {
		return wayIcon;
	}

	@Override
	public int getDriveColor() {
		return this.routeColor;
	}

	@Override
	protected LatLngBounds getLatLngBounds() {
		return super.getLatLngBounds();
	}
}
